package com.telkomsigma.hibernate.services.captain;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.telkomsigma.hibernate.common.PaginatedResult;
import com.telkomsigma.hibernate.persistence.captain.dao.CaptainDaoImpl;
import com.telkomsigma.hibernate.persistence.captain.entity.Captain;

@Service("captainService")
public class CaptainServiceDao implements CaptainService {

	@Autowired
	CaptainDaoImpl captainDao;
	
	public void setCaptainDao(CaptainDaoImpl captainDao) {
		this.captainDao = captainDao;
	}

	@Override
	@Transactional(readOnly = false)
	public Captain insert(Captain transientInstance) {
		return captainDao.insert(transientInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Captain update(Captain detachedInstance) {
		return captainDao.update(detachedInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Boolean remove(Captain persistentInstance) {
		return captainDao.remove(persistentInstance);
	}

	@Override
	@Transactional(readOnly = false)
	public Boolean removeList(List<Captain> list) {
		return captainDao.removeList(list);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Captain findById(String id) {
		return captainDao.findById(id);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Captain> findByProperty(String propertyName, Object value,
			int... rowStartIdxAndCount) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Captain> findAll(int... rowStartIdxAndCount) {
		return captainDao.findAll(rowStartIdxAndCount);
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Captain> findLikeProperty(String propertyName, Object value,
			int... rowStartIdxAndCount) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Captain> findLikeMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public List<Captain> findByMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countAll() {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countLikeProperty(String propertyName, Object value) {
	
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countByProperty(String propertyName, Object value) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countLikeMapOfProperties(Map<String, Object> propertiesMap) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public Integer countByMapOfProperties(Map<String, Object> propertiesMap) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Captain> paginateLikeMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Captain> paginateAll(int... rowStartIdxAndCount) {
		
		return null;
	}

	@Override
	@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
	public PaginatedResult<Captain> paginateByMapOfProperties(
			Map<String, Object> propertiesMap, int... rowStartIdxAndCount) {
		
		return null;
	}

}
